<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Checking out Form</title>
<link rel="stylesheet" type="text/css" href="<{$APPLICATION_URL}>/Themes/<{$templateName}>/styles/m_style.css" media="screen" />
<script type="text/javascript" src="<{$APPLICATION_URL}>/Themes/<{$templateName}>/js/jquery.min.js"></script>
<script type="text/javascript">
var $ = jQuery.noConflict();
	$(function() {
		$('#activator').click(function(){
				$('#box').animate({'top':'65px'},500);
		});
		$('#boxclose').click(function(){
				$('#box').animate({'top':'-400px'},500);
		});
		$('#activator_share').click(function(){
				$('#box_share').animate({'top':'65px'},500);
		});
		$('#boxclose_share').click(function(){
				$('#box_share').animate({'top':'-400px'},500);
		});

	});
	$(document).ready(function(){
	$(".toggle_container").hide(); 
	$(".trigger").click(function(){
		$(this).toggleClass("active").next().slideToggle("slow");
		return false;
	});
	
	});
</script>
<meta charset="UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes" /> 
<meta name="apple-mobile-web-app-status-bar-style" content="blue" /> 
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" />
</head>

<body>
<div id="main_container">
	<div class="header">
    <a href="<{$APPLICATION_URL}>/<{$ownerName}>" class="left_bt">home</a>
	<{if $moduleName == "Product"}>	
        <a href="<{$APPLICATION_URL}>/<{$ownerName}>Product/shoppingCart" class="left_bt">my cart</a>
		<a href="<{$APPLICATION_URL}>/<{$ownerName}>Product/checkoutShipping" class="left_bt">checkout</a>
		<a href="<{$APPLICATION_URL}>/<{$ownerName}>Product" class="left_bt">store</a>
     <{/if}>
    <span>Checking out Form</span>
    <a href="#" class="right_bt" id="activator"><img src="<{$APPLICATION_URL}>/Themes/<{$templateName}>/images/search.png" alt="" title="" border="0" /></a>
    </div>
    
        <div class="box" id="box">
        	<div class="box_content">            
            	<div class="box_content_tab">
                Search
                </div>
                
                <div class="box_content_center">
                <div class="form_content">
                <form action="<{$APPLICATION_URL}>/<{$ownerName}>Search" method="post">
                <input name="name" type="text" id="searchf" class="form_input_box" />
                <input name="module" type="hidden" class="input-text" value="<{$moduleName}>"/>
                <a class="boxclose" id="boxclose">Close</a>
                <input type="submit" title="submit" class="form_submit" value="Submit" />
                </form>
                </div> 
                
                <div class="clear"></div>
                </div>
            
           </div>
        </div>

        <div class="box" id="box_share">
        	<div class="box_content">
            	<div class="box_content_tab">
                Join Us On
              </div>
                <div class="box_content_center">
                
                        <div class="social_share">
                        <ul>
                            <{if $ownerFacebook != ""}>
                            <li><a href="<{$ownerFacebook}>" target="blank"><img src="<{$APPLICATION_URL}>/Themes/<{$templateName}>/images/social/facebook.png" alt="Join Us On Facebook" border="0" /></a></li>
                            <{/if}>
                            
                            <{if $ownerTwitter != ""}>
                            <li><a href="<{$ownerTwitter}>" target="blank"><img src="<{$APPLICATION_URL}>/Themes/<{$templateName}>/images/social/twitter.png" alt="Join Use On Twitter" border="0" /></a></li>
                            <{/if}>
                            
                            <{if $ownerLinkin != ""}>
                            <li><a href="<{$ownerLinkin}>" target="blank"><img src="<{$APPLICATION_URL}>/Themes/<{$templateName}>/images/social/linkedin.png" alt="Join Us In Linkedin" border="0" /></a></li>
                            <{/if}>
                            
                            <{if $ownerDribbble != ""}>
                            <li><a href="<{$ownerDribbble}>" target="blank"><img src="<{$APPLICATION_URL}>/Themes/<{$templateName}>/images/social/dribbble.png" alt="Join Us In Dribbble" border="0" /></a></li>
                            <{/if}>
                            
                            <{if $ownerDigg != ""}>
                            <li><a href="<{$ownerDigg}>" target="blank"><img src="<{$APPLICATION_URL}>/Themes/<{$templateName}>/images/social/digg.png" alt="Join Us In Digg" border="0" /></a></li>
                            <{/if}>
                            
                            <{if $ownerVimeo != ""}>
                            <li><a href="<{$ownerVimeo}>" target="blank"><img src="<{$APPLICATION_URL}>/Themes/<{$templateName}>/images/social/vimeo.png" alt="Join Us In Vimeo" border="0" /></a></li>
                            <{/if}>
                            
                            <{if $ownerYoutube != ""}>
                            <li><a href="<{$ownerYoutube}>" target="blank"><img src="<{$APPLICATION_URL}>/Themes/<{$templateName}>/images/social/youtube.png" alt="Join Us In Youtube" border="0" /></a></li>
                            <{/if}>
                            
                            <{if $ownerForrst != ""}>
                            <li><a href="<{$ownerForrst}>" target="blank"><img src="<{$APPLICATION_URL}>/Themes/<{$templateName}>/images/social/forrst.png" alt="Join Us In Forrst" border="0" /></a></li>
                            <{/if}>
                            
                            <{if $ownerFlickr != ""}>
                            <li><a href="<{$ownerFlickr}>" target="blank"><img src="<{$APPLICATION_URL}>/Themes/<{$templateName}>/images/social/flickr.png" alt="Join Us In Flickr" border="0" /></a></li>
                            <{/if}>
                        </ul>
                        </div>
            
                <a class="boxclose_right" id="boxclose_share">close</a>
                <div class="clear"></div>
                
                </div>
           </div>
        </div>
        
	<div class="content">
       	<form name="cart_quantity"
		action="<{$APPLICATION_URL}>/<{$ownerName}>Product/updateCart"
		method="post">
				<{if $countCartList > 0}>
					<{assign var=i value=0}>	
					<{assign var=totalPrice value=0}>
					<{foreach item=cartItem from=$cartList}>
					<{assign var=product value=$cartItem->getProduct()}>
					<{assign var=customer value=$cartItem->getCustomer()}>
					<{assign var=finalPrice value=$cartItem->finalPrice}>
					<div class="corner_wrap">
            <div class="entry">  
				<p>  
            <a href="<{$APPLICATION_URL}>/<{$ownerName}>Product/details/id/<{$product->id}>"><img src="<{$product->getThumb()}>" alt="<{$product->getName()}>" title="<{$product->getName()}>" class="left_pic" border="0" /></a>          
            <h3><a href="<{$APPLICATION_URL}>/<{$ownerName}>Product/details/id/<{$product->id}>"><{$product->getName()}></a></h3>
            <p><{$currencySymbol}><{$product->price|string_format:"%.2f"}></p>
            Quantity: <input	type="text" name="quantity<{$i}>" value="<{$cartItem->quantity}>" size="4" style="width: 30px" /> <br/>
			<a href="#" onclick="return formSubmit();" class="left_bt">Update</a>
			<a href="<{$APPLICATION_URL}>/<{$ownerName}>Product/removeCart/id/<{$product->id}>" class="left_bt">Remove</a>
            </p> 
				<div class="clear"></div>
			</div>
			</div>		
			<div class="shadow_wrap"></div>			
					<{assign var=i value=$i+1}>	
								<{assign var=totalPrice value=$totalPrice+$finalPrice}>
								<{/foreach}>
					<{else}>			
			<div class="corner_wrap">
            <div class="entry"> 
			<p>
					Your cart is empty now. Please back to our shop and buy somethings. 
			</p>
			<div class="clear"></div>
			</div>
			</div>
					<{/if}>
					<div class="corner_wrap">
						<div class="entry">  
							<p>
								<strong>Sub-Total: $<{$totalPrice|string_format:"%.2f"}></strong>
								<br/>
								<a href="<{$APPLICATION_URL}>/<{$ownerName}>Product/checkoutShipping" class="left_bt">Next</a>
							</p>
							<div class="clear"></div>
						</div>
					</div>	
		<input type="hidden" id="actionForm" name="actionForm" value=""/>
		<input type="hidden" id="totals" name="totals" value="<{$countCartList}>"/>
	</form>
	<div class="clear_left"></div>
	
    </div>
</div>
<div id="footer">
<{if $ownerTwitter != "" || $ownerDribbble != "" || $ownerDigg != "" || $ownerVimeo != "" || $ownerYoutube != "" || $ownerForrst != "" || $ownerFlickr != "" || $ownerFacebook != "" || $ownerLinkin != ""}>
<a href="#" class="left_bt" id="activator_share">Follow</a>
<{/if}>
<span><small>
&copy; <{$smarty.now|date_format:"%Y"}> <{$ownerFullName}>. All rights reserved
<{if $isBrandingFree == false}>
 , powered by <a href="http://www.slappit.com" title="Slappit.com - Ecommerce Websites From &pound;5 A Month">Slappit.com</a>
<{/if}>
</small></span>
<a onclick="jQuery('html, body').animate( { scrollTop: 0 }, 'slow' );"  href="" title="Go on top" class="right_bt"><img src="<{$APPLICATION_URL}>/Themes/<{$templateName}>/images/top.png" alt="" title="" border="0" /></a>
</div>

<script type="text/javascript"><!--
var form = "";
var submitted = false;
var error = false;
var error_message = "";

function formSubmit() {
  if (submitted == true) {
    alert("This form has already been submitted. Please press Ok and wait for this process to be completed.");
    return false;
  }

  error = false;
  form = document.cart_quantity;
  form.actionForm.value = 'submit';
	submitted = true;	
	form.submit();
	return true;
}
//--></script>
</body>
</html>
